import request from '@/config/axios'
/**
 * 查询业务字段
 */
export const listQuery = (params) => {
  return request.get({ url: '/setting/business-field/list-query', params })
}

/**
 * 根据业务字段ID获取业务字段选项
 */
export const getOptionByFieldId = (id) => {
  return request.get({ url: '/setting/business-field/get-option-by-field-id?id=' + id })
}

/**
 * 获取单个业务字段
 */
export const singleGet = (id) => {
  return request.get({ url: '/setting/business-field/single-get?id=' + id })
}

/**
 * 更新业务字段
 */
export const update = (data) => {
  return request.put({ url: '/setting/business-field/update', data })
}

/**
 * 根据业务模块获取业务
 */
export const getByModule = (businessModule) => {
  return request.get({
    url: '/setting/business-field/get-by-module?businessModule=' + businessModule
  })
}

/**
 * 获取工作状态离职的id
 */
export const getWorkStateResignOptionId = () => {
  return request.get({ url: '/setting/business-field/get-work-state-resign-option-id' })
}
